#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <queue>

inline int read() {
  int res = 0, ch = getchar();
  bool flag = false;
  while (!isdigit(ch)) {
    if (ch == '-') flag = true;
    ch = getchar();
  }
  while (isdigit(ch)) res = (res << 3) + (res << 1) + ch - 48, ch = getchar();
  return flag ? -res : res;
}

const int N = 3e5 + 5, inf = 0x7f7f7f7f;
int n, m, tot, dep[N], dfn[N], lg[N];
int tran[N], f[N][21], cnt;
int e_cnt, heads[N];
int cntp, all[N];
bool vis[N], tag;

struct Node {
  int t, pos;
  Node() {}
  Node(int t, int pos) : t(t), pos(pos) {}
} p[N], now[N];
std::queue<Node> q;

struct Edge {
  int v, nxt;
} e[N << 1];

inline void add(int u, int v) {
  e[++e_cnt].v = v, e[e_cnt].nxt = heads[u], heads[u] = e_cnt;
}

void solve(int u, int fa) {
  dfn[++cnt] = u, tran[u] = cnt;
  for (int i = heads[u], v; i; i = e[i].nxt) {
    if ((v = e[i].v) != fa) {
      dep[v] = dep[u] + 1;
      solve(v, u);
      dfn[++cnt] = u;
    }
  }
}

inline int mmin(int x, int y) { return dep[x] < dep[y] ? x : y; }

int getlca(int x, int y) {
  if (tran[x] > tran[y]) std::swap(x, y);
  int l = tran[x], r = tran[y], k = lg[r - l + 1];
  return mmin(f[l][k], f[r - (1 << k) + 1][k]);
}

inline int getdis(int x, int y) {
  return dep[x] + dep[y] - (dep[getlca(x, y)] << 1);
}

inline void reset() {
  memset(vis, 0, sizeof(vis));
  memset(all, inf, sizeof(all));
  for (int i = 1; i <= tot; i++) p[++cntp] = now[i];
  for (int i = 1; i <= cntp; i++)
    all[p[i].pos] = std::min(all[p[i].pos], p[i].t);
  q.push(p[1]);
  int ll = 2;
  for (int i = 1; i <= tot; i++)
    all[p[i].pos] = std::min(all[p[i].pos], p[i].t);
  while (!q.empty()) {
    Node u = q.front();
    q.pop();
    for (int i = heads[u.pos], v; i; i = e[i].nxt) {
      if (!vis[v = e[i].v]) {
        vis[v] = true;
        all[v] = std::min(all[v], all[u.pos] + 1);
        q.push(Node(all[v], v));
        if (all[v] == p[ll].t) {
          vis[p[ll].pos] = true;
          q.push(p[ll]), ll++;
        }
      }
    }
  }
  tot = tag = 0;
}

inline void query(int u, int nowtime) {
  if ((!tag) && (nowtime >= all[u])) return puts("wrxcsd"), void();
  for (int i = 1; i <= tot; i++)
    if (getdis(u, now[i].pos) <= nowtime - now[i].t)
      return puts("wrxcsd"), void();
  puts("orzFsYo");
}

signed main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#else
  freopen("External.in", "r", stdin);
  freopen("External.out", "w", stdout);
#endif
#endif

  memset(all, inf, sizeof(all));
  lg[0] = -1;
  for (int i = 1; i < N; i++) lg[i] = lg[i >> 1] + 1;
  p[0].t = inf;
  n = read(), m = read();
  for (int i = 1, u, v; i < n; i++) {
    u = read(), v = read();
    add(u, v), add(v, u);
  }
  dep[1] = 1;
  solve(1, 1);
  n <<= 1;
  for (int i = 1; i <= cnt; i++) f[i][0] = dfn[i];
  for (int i = 1; i <= lg[n]; i++)
    for (int j = 1; j + (1 << i) - 1 <= n; j++) {
      f[j][i] = mmin(f[j][i - 1], f[j + (1 << (i - 1))][i - 1]);
    }
  int block = sqrt(m) * 3;
  for (int i = 1, opt, x; i <= m; i++) {
    if (i % block == 0) reset();
    opt = read(), x = read();
    if (opt == 1) now[++tot] = Node(i, x);
    else if (opt == 2)
      tag = true, tot = cntp = 0;
    else
      query(x, i);
  }
  return 0;
}